package org.example.springbook.model;

import lombok.Data;


public class PageRequest {
    private Integer offset;
    private Integer pageSize=10;
    private Integer currentPage=1;

    public PageRequest() {
        offset=(currentPage-1)*pageSize;
    }

    public Integer getOffset() {
        return offset;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public Integer getCurrentPage() {
        return currentPage;
    }

    public void setCurrentPage(Integer currentPage) {
        this.currentPage = currentPage;
    }
}
